/**
 *  Copyright 2010 Kyle O'Connor, Justin Arling, Mike Mercieca
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  any later version.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
package edu.drexel.sd0910.ece01.aqmon.util.run;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;

/**
 * Interface that specifies that this class provides some type of
 * <code>{@link java.util.concurrent.ExecutorService ExecutorService}</code>.
 * 
 * 
 * @author Kyle O'Connor
 * 
 */
public interface ExecutorServiceProvider {

	/**
	 * Method name for <code>Executors.newSingleThreadScheduledExecutor</code>
	 * which requires no arguments.
	 */
	String NEW_SINGLE_THREAD_SCHEDULED_EXECUTOR = "newSingleThreadScheduledExecutor";

	/**
	 * Method name for <code>Executors.newScheduledThreadPool</code> which
	 * requires an <code>Integer</code> argument.
	 */
	String NEW_SCHEDULED_THREAD_POOL = "newScheduledThreadPool";

	/**
	 * Method name for <code>Executors.newSingleThreadExecutor</code> which
	 * requires no arguments.
	 */
	String NEW_SINGLE_THREAD_EXECUTOR = "newSingleThreadExecutor";

	/**
	 * Constant used to declare that no <code>ExecutorService</code> is
	 * required.
	 */
	String NO_EXECUTOR_SERVICE = "No ExecutorService Required";

	/**
	 * Returns the {@link ExecutorService} being used by this class. The service
	 * should be created by this method if it does not already exist.
	 * 
	 * @return the {@link ScheduledExecutorService} instance
	 */
	ExecutorService getExecutorService();

	/**
	 * Stops the {@link ExecutorService} instance being used by this class. It
	 * can be restarted calling the method {@link #getExecutorService()}.
	 */
	void stopExecutorService();

}
